package com.laoxu.breadcrumb.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @Description:
 * @Author laoxu
 * @Date 2019/10/3 0:20
 **/
@Entity
@Table(name="tb_category")
@Data
public class Category {
    @Id
    private Long id;

    @Column(name = "category_name", nullable = false, length = 100)
    private String categoryName;

    @Column(name = "parent_id", length = 20)
    private Long parentId;
    // 类别层级，1级为菜单 2级为具体分类
    @Column(name="level", nullable = false, length = 1)
    private int level;
}
